import { createApp } from 'vue'
import App from './App.vue'
//引入ant design vue
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
//引入图标
import * as Icons from "@ant-design/icons-vue";
//引入路由
import router from "./router";
//引入Pinia
import { createPinia } from 'pinia'
//引入自定义封住工具
import objCopy from "@/utils/objCopy"
import myConfirm from "@/utils/myConfirm"

const pinia = createPinia()
const app = createApp(App);

//全局挂载自定义工具
app.config.globalProperties.$objCopy = objCopy;
app.config.globalProperties.$myConfirm = myConfirm;

//全局注册图标
Object.keys(Icons).forEach((key) => {
    app.component(key,Icons[key as keyof typeof Icons])
})

//使用
app.use(Antd).use(router).use(pinia).mount('#app')
import './permission'
